package com.levi.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.math.BigDecimal;

/**
 * @author shentong
 * @since 2022/3/20 5:22 PM
 */
@TableName(value = "mall_pay_info")
@Data
public class PayInfo extends BaseEntity{

    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;

    @TableField("user_id")
    private Integer userId;

    /**
     * 订单号
     */
    @TableField("order_no")
    private Long orderNo;

    /**
     * 支付平台  1-支付宝   2-微信
     */
    @TableField("pay_platform")
    private Integer payPlatform;

    /**
     * 支付流水号
     */
    @TableField("platform_number")
    private String platformNumber;

    /**
     * 支付状态
     */
    @TableField("platform_status")
    private String platformStatus;

    /**
     * 支付金额
     */
    @TableField("pay_amount")
    private BigDecimal payAmount;

    public PayInfo(Long orderNo, Integer payPlatform, String platformStatus, BigDecimal payAmount) {
        this.orderNo = orderNo;
        this.payPlatform = payPlatform;
        this.platformStatus = platformStatus;
        this.payAmount = payAmount;
    }
}
